//
//  ZYThirdShareManager.h
//  SuiTong
//
//  Created by 石志愿 on 2020/9/3.
//  Copyright © 2020 石志愿. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "ZYShareConstans.h"

NS_ASSUME_NONNULL_BEGIN

@interface ZYShareManager : NSObject

///是否安装微信
@property (nonatomic, assign, readonly) BOOL installWeChat;

///是否安装QQ
@property (nonatomic, assign, readonly) BOOL installQQ;

///是否安装微博
@property (nonatomic, assign, readonly) BOOL installWeiBo;

+ (instancetype)shared;

/// 初始化sdk
- (void)registerSDK;


/// 处理应用拉起协议
- (BOOL)HandleOpenURL:(NSURL *)url;

/// 处理应用的UniversalLink拉起协议;
- (BOOL)HandleUniversalLink:(NSUserActivity *)userActivity;

/// 分享网页
- (void)shareWebPage:(ZYThirdShareInfo *)info platform:(ZYSharePlatform)platform completion:(__nullable ZYThirdShareBlock)completion;

///复制链接
- (void)copylink:(NSString *)link;

/// 分享图片
- (void)shareImage:(UIImage *)image thumbImage:(UIImage *)thumbImage  platform:(ZYSharePlatform)platform completion:(__nullable ZYThirdShareBlock)completion;

///分享文本
- (void)shareText:(NSString *)text platform:(ZYSharePlatform)platform completion:(__nullable ZYThirdShareBlock)completion;


/// 登录
- (void)login:(ZYThirdLoginPlatform)platform completion:(__nullable ZYThirdLoginBlock)completion;

/// get请求
- (void)get:(NSString *)url parameters:(NSDictionary *)parameters showLoading:(BOOL)showLoading success:(void(^)(id response))success failure:(void (^)(NSError *error))failure;

@end

NS_ASSUME_NONNULL_END
